﻿using Mes.Domain.BoundedContext.EntityBase;

namespace Mes.Domain.BoundedContext.Entities.Operations
{
    public class OperStep : NoIdEntityBase
    {
        public OperStep() { }

        public OperStep(string processId, string operId, int stepGrpId, int stepNo, int stepSeq, string? stepName, string stepDesc, string? lastEditComment, DateTime lastEditAt)
        {
            Process_Id = processId;
            Oper_Id = operId;
            Step_Grp_Id = stepGrpId;
            Step_No = stepNo;
            Step_Seq = stepSeq;
            Step_Name = stepName;
            Step_Desc = stepDesc;
            Last_Edit_Comment = lastEditComment;
            Last_Edit_At = lastEditAt;
        }

        public string Process_Id { get; set; } = string.Empty;

        public string Oper_Id { get; set; } = string.Empty;

        public int Step_No { get; set; } = 0;

        public int Step_Seq { get; set; } = 0;

        public string? Step_Name { get; set; } = null;

        public string Step_Desc { get; set; } = string.Empty;

        public int Action_Type { get; set; } = 0;

        public double Std_Time { get; set; } = 0;

        public int Complete_Cond { get; set; } = 3;

        public bool Allow_Bypass { get; set; } = false;

        public bool Enter_Data { get; set; } = false;

        public int Step_Grp_Id { get; set; } = 0;

        public string? Spc_Char { get; set; } = null;

        public string? Form_Name { get; set; } = null;

        public int? Data_Log_Grp_Id { get; set; } = null;

        public double Reqd_Rep_Pct { get; set; } = 0;

        public int Control_Type { get; set; } = 0;

        public double? High_Limit { get; set; } = 0;

        public double? Low_Limit { get; set; } = 0;

        public bool Limit_Warning { get; set; } = false;

        public string? Spare1 { get; set; } = null;

        public string? Spare2 { get; set; } = null;

        public string? Spare3 { get; set; } = null;

        public string? Spare4 { get; set; } = null;

        public string? Spare5 { get; set; } = null;

        public string? Spare6 { get; set; } = null;

        public string? Last_Edit_Comment { get; set; } = null;

        public string? Last_Edit_By { get; set; } = null;

        public DateTime Last_Edit_At { get; set; } = DateTime.Now;

        public long Mod_Id { get; set; } = 0;

        public int Row_Id { get; set; } = 0;
    }
}
